using System.Collections;
using System.Collections.Generic;
using UnityEngine;


namespace Unity.Per.Common.UIFrameWork
{
    public abstract class BaseEntery :BaseModuleMono
    {

        [SerializeField]
        private List<BaseWindowSlot> m_baseWindowSlotList;
        public List<BaseWindowSlot> baseWindowSlotList {
            get {
                if ( m_baseWindowSlotList == null ) {
                    m_baseWindowSlotList = new List<BaseWindowSlot>();
                }
                return m_baseWindowSlotList;
            }
        }


        public virtual void AddBaseWindowSlot(BaseWindowSlot baseWindowSlot) {
            if ( baseWindowSlotList == null )
                return;
            if ( baseWindowSlotList.Contains(baseWindowSlot) == false ) {
                baseWindowSlotList.Add(baseWindowSlot);
            }
        }

        public virtual void RemoveBaseWindowSlot(BaseWindowSlot baseWindowSlot) {
            if ( baseWindowSlotList == null )
                return;
            if ( baseWindowSlotList.Contains(baseWindowSlot) ) {
                baseWindowSlotList.Remove(baseWindowSlot);
            }
        }

        private void OnEnable() {
            ModuleStart();
        }

        private void OnDisable() {
            ModuleStop();
        }

        private void Update() {
            ModuleUpdate();
        }

        private void LateUpdate() {
            ModuleLateUpdate();
        }

    }
}
